<template>
        <alarmevents :title="title" :data="inspection" :isShow="false" :isshowlefts="true" />
</template>
<script lang="ts" setup>

import alarmevents from '@/views/large-data-screen/component/public/alarmevents.vue';
import img1 from '@/assets/screenimg/samllIcon.png'
import img2 from '@/assets/screenimg/samllIcon1.png'
import img3 from '@/assets/screenimg/samllIcon3.png'
import { showLnspectionTasks } from '@/views/large-data-screen/utils/index'

const props = defineProps({
    dataList: {
        type: Object,
        default: () => []
    },
});
const title = ref('巡检统计')
//告警事件列表
const inspection = ref([
    {
        name: '已巡检',
        color: '#21CC31',
        number: 0,
        type: 1,
        img: img2,
        clickFun: () => showLnspectionTasks({ defaultSearch: { missionStatus: 3 } })
    },
    {
        name: '巡检中',
        number: 0,
        color: '#27E6E1',
        type: 2,
        img: img1,
        clickFun: () => showLnspectionTasks({ defaultSearch: { missionStatus: 2 } })
    },
    {
        name: '待巡检',
        number: 0,
        color: '#FF802B',
        type: 3,
        img: img3,
        clickFun: () => showLnspectionTasks({ defaultSearch: { missionStatus: 1 } })
    },

])
onBeforeMount(() => {
    inspection.value[0].number = props.dataList?.inspectDeal ?? 0
    inspection.value[1].number = props.dataList?.inspecting ?? 0
    inspection.value[2].number = props.dataList?.inspectWait ?? 0
})

</script>
<style></style>
